package gameconstruction;

import model.ModelContext;
import controller.GameController;
import drawing.DrawAbles;

public class GameCreator {	
	private GameCreator(){

	}
	
	/**
	 * Starts the GameController
	 */
	public static void start(LevelCreator firstlevel){
		//create an empty list of objects
		//spawn the model
		ModelContext mc = new ModelContext();
		firstlevel.spawnModels(mc);
		//spawn the views
		DrawAbles vc = new DrawAbles();
		firstlevel.spawnViews(vc);
		//spawn the controller
		GameController gc = new GameController(mc,vc);
		//add the controllers
		firstlevel.spawnControllers(gc);
		System.out.println("Running the game");
		gc.run();
	}
}
